package com.kehutong.contact.entity;

import com.kehutong.contact.enums.BindType;
import com.kehutong.contact.enums.CarType;
import org.coraframework.bean.valid.CheckField;
import org.coraframework.orm.Entity;
import org.coraframework.orm.annotation.Column;
import org.coraframework.orm.annotation.Table;
import org.coraframework.orm.annotation.UnSave;

import java.time.LocalDateTime;

@Table(value="t_resident_car", comment="住户车信息", multi=true)
public class ResidentCar extends Entity {

    private static final long serialVersionUID = -204131018664727070L;

    protected ResidentCar(String id) {
        super(id);
    }

	@CheckField("住户编号不能为空")
    @Column(comment = "住户编号")
    private String residentNo;
    
    @Column(comment = "车位号编号")
    private String parkingNo;

    @UnSave
	private String parkingName;

	@Column(comment = "房屋编号")
	private String houseNo;

	@UnSave
	private String houseName;

	@Column(defValue = "NOT NULL default '0' ", comment = "新能源 0.不是新能源 1.新能源")
	private boolean newEnergy;

	@CheckField("车牌号不能为空")
    @Column(comment = "车牌号")
    private String carNo;

	@Column(comment = "车辆类型")
	private CarType type;

    @Column(comment = "品牌")
    private String carBrand;

    @Column(comment = "型号")
    private String carModel;

    @Column(comment = "车颜色")
    private String carColor;

    //绑定类型
	@UnSave
	private BindType bindType;

	//绑定时间
	@UnSave
	private LocalDateTime bindTime;

	//解绑|失效时间
	@UnSave
	private LocalDateTime unBindTime;

	@Column(comment = "逻辑删除")
    private boolean deleted;

	public String getResidentNo() {
		return residentNo;
	}

	public void setResidentNo(String residentNo) {
		this.residentNo = residentNo;
	}

	public String getParkingNo() {
		return parkingNo;
	}

	public void setParkingNo(String parkingNo) {
		this.parkingNo = parkingNo;
	}

	public String getParkingName() {
		return parkingName;
	}

	public void setParkingName(String parkingName) {
		this.parkingName = parkingName;
	}

	public String getHouseNo() {
		return houseNo;
	}

	public void setHouseNo(String houseNo) {
		this.houseNo = houseNo;
	}

	public String getHouseName() {
		return houseName;
	}

	public void setHouseName(String houseName) {
		this.houseName = houseName;
	}

	public String getCarNo() {
		return carNo;
	}

	public void setCarNo(String carNo) {
		this.carNo = carNo;
	}

	public String getCarBrand() {
		return carBrand;
	}

	public void setCarBrand(String carBrand) {
		this.carBrand = carBrand;
	}

	public String getCarModel() {
		return carModel;
	}

	public void setCarModel(String carModel) {
		this.carModel = carModel;
	}

	public String getCarColor() {
		return carColor;
	}

	public void setCarColor(String carColor) {
		this.carColor = carColor;
	}

	public BindType getBindType() {
		return bindType;
	}

	public void setBindType(BindType bindType) {
		this.bindType = bindType;
	}

	public LocalDateTime getBindTime() {
		return bindTime;
	}

	public void setBindTime(LocalDateTime bindTime) {
		this.bindTime = bindTime;
	}

	public LocalDateTime getUnBindTime() {
		return unBindTime;
	}

	public void setUnBindTime(LocalDateTime unBindTime) {
		this.unBindTime = unBindTime;
	}

	public boolean isDeleted() {
		return deleted;
	}

	public void setDeleted(boolean deleted) {
		this.deleted = deleted;
	}

	public boolean isNewEnergy() {
		return newEnergy;
	}

	public void setNewEnergy(boolean newEnergy) {
		this.newEnergy = newEnergy;
	}

	public CarType getType() {
		return type;
	}

	public void setType(CarType type) {
		this.type = type;
	}
}
